using Microsoft.Practices.Composite.Modularity;
using Microsoft.Practices.Composite.Regions;
using Microsoft.Practices.Unity;

namespace Modules.AccountMgmt
{
    public class Module : IModule
    {
        private readonly IRegionManager regionManager;
        private readonly IUnityContainer container;

        public Module(IRegionManager regionManager, IUnityContainer container)
        {
            this.regionManager = regionManager;
            this.container = container;
        }

        public void Initialize() {
            this.regionManager.Regions["MainRegion"].Add(this.container.Resolve<AccountView>());
        }
    }
}